package com.tedu.pj.goods.dao;

import com.tedu.pj.goods.pojo.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.time.MonthDay;
import java.util.List;

@Mapper
public interface GoodsDao {

    @Update("update tb_goods set name=#{name},remark=#{remark} where id=#{id}")
    public int updateGoods(Goods goods);

    @Select("select * from tb_goods where id=#{id}")
    public Goods findByIdGoods(int id);

    public int removeByIdGoods(int id);

    public void insertGoods(Goods goods);

    /**
     * 查询所有商品信息
     * @return
     */
    @Select("select * from tb_goods")
    public List<Goods> findGoods();

}
